import pygame
from pygame.locals import *
pygame.init()
screen = pygame.display.set_mode((800,800))
rect1 = Rect(50,60,200,80)
rect2 = rect1.copy()
running = True
x = 0
y = 0
while running:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False
        if event.type == KEYDOWN:
            if event.key == K_UP:
                y = -5
                x = 0
            if event.key == K_RIGHT:
                x = 5
                y = 0
            if event.key == K_LEFT:
                x = -5
                y = 0
            if event.key == K_DOWN:
                y = 5
                x = 0
    rect2.inflate_ip(x,y)
    screen.fill((157,157,157))
    pygame.draw.rect(screen,(255,0,0),rect1,1)
    pygame.draw.rect(screen, (0, 0, 255), rect2, 5)
    pygame.display.update()
pygame.quit()